﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace UIWindows.Models
{
    public class CircuitTesterData : INotifyPropertyChanged
    {

        /// <summary>
        /// 电阻值
        /// </summary>
        private string ir;
        public string IR
        {
            get { return ir; }
            set
            {
                if (ir != value)
                {
                    ir = value;
                    NotifyPropertyChanged(nameof(IR));
                }
            }
        }
        /// <summary>
        /// 电压
        /// </summary>
        private string voltage;
        public string Voltage
        {
            get { return voltage; }
            set
            {
                if (voltage != value)
                {
                    voltage = value;
                    NotifyPropertyChanged(nameof(Voltage));
                }
            }
        }
        /// <summary>
        /// 电流
        /// </summary>
        private string current;
        public string Current
        {
            get { return current; }
            set
            {
                if (current != value)
                {
                    current = value;
                    NotifyPropertyChanged(nameof(Current));
                }
            }
        }
        /// <summary>
        /// 测试时间
        /// </summary>
        private string testDatetime;
        public string TestDatetime
        {
            get { return testDatetime; }
            set
            {
                if (testDatetime != value)
                {
                    testDatetime = value;
                    NotifyPropertyChanged(nameof(TestDatetime));
                }
            }
        }
        public event PropertyChangedEventHandler PropertyChanged;

        protected virtual void NotifyPropertyChanged(string propertyName)
        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }
        ///// <summary>
        ///// 电阻值
        ///// </summary>
        //public string IR { get;set; }

        ///// <summary>
        ///// 电压
        ///// </summary>
        //public string Voltage { get; set; }
        ///// <summary>
        ///// 电流
        ///// </summary>
        //public string Current { get; set; }
        ///// <summary>
        ///// 测试时间
        ///// </summary>
        //public string TestDatetime { get; set; }
    }
}
